home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CUJ9206.ARJ / 1006071B < prev    next >
Text File  |  1992-06-02  |  1KB  |  46 lines

  1.  
  2.  int  sym_util_debug = 0 ;     /* Global debug switch. */
  3.  
  4.                                /* Internal variables. */
  5.  typedef  struct  symbol_node {
  6.      ...
  7.  } symbol_node ;
  8.  static  symbol_node  *symbol_list = NULL ;
  9.  
  10.                                /* Public functions. */
  11.  void  sym_add (), sym_delete () ;
  12.  int  sym_lookup () ;
  13.                                /* Internal functions. */
  14.  static  symbol_node  *sym_locate () ;
  15.  
  16.  
  17.  void  sym_add (name, value)
  18.      char  *name ;
  19.      int  value ;
  20.  {
  21.      ... adds NAME/VALUE pair to the symbol table ...
  22.  }
  23.  
  24.  void  sym_delete (name)
  25.      char  *name ;
  26.  {
  27.      ... deletes NAME from the symbol table ...
  28.  }
  29.  
  30.  int  sym_lookup (name)
  31.      char  *name ;
  32.  {
  33.      ... returns NAME's value from the symbol table ...
  34.  }
  35.                           /* Internal function called
  36.                              by the other functions. */
  37.  static  symbol_node  *sym_locate (name)
  38.      char  *name ;
  39.  {
  40.      ... locates NAME's node in the symbol list ...
  41.  }
  42.  
  43.  
  44.               Listing 2: C Symbol Table Package
  45.  
  46.